From c516e5ec52c18baf27cd52999663617bf647283a Mon Sep 17 00:00:00 2001 From: Steven Hand Date: Tue, 27 Feb 2007 14:33:07 +0000 Subject: [PATCH] Fix save/restore (and non-live migrate) on PAE. Plus add some more debug output to help us spot similar issues in the future. Signed-off-by: Steven Hand --- tools/libxc/xc_linux_save.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c index a8f100299d..d8c87e3d95 100644 --- a/tools/libxc/xc_linux_save.c +++ b/tools/libxc/xc_linux_save.c @@ -513,7 +513,7 @@ static int canonicalize_pagetable(unsigned long type, unsigned long pfn, */ if (pt_levels == 3 && type == XEN_DOMCTL_PFINFO_L2TAB) { int hstart; - unsigned long he; + uint64_t he; hstart = (hvirt_start >> L2_PAGETABLE_SHIFT_PAE) & 0x1ff; he = ((const uint64_t *) spage)[hstart]; @@ -1101,8 +1101,11 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, race = canonicalize_pagetable(pagetype, pfn, spage, page); - if(race && !live) - goto out; + if(race && !live) { + ERROR("Fatal PT race (pfn %lx, type %08lx)", pfn, + pagetype); + goto out; + } if (ratewrite(io_fd, live, page, PAGE_SIZE) != PAGE_SIZE) { ERROR("Error when writing to state file (4)" -- 2.30.2